package com.ssy.lingxi.scheduler.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * 服务配置类
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-13
 */
@Configuration
public class ServiceConfig {

    /**
     * 定义RestTemplate Bean，用于向其他服务发送通知
     * @return RestTemplate Bean
     */
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
